﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>#{softtitle}</title>
<link href="#{path.css}ybb/css/baselist.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/all.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/formdiv.css?v=#{cssVersion}" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="#{path.js}ybb/js/jquery.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/control.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/form.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="/static/public/tinyMCE/jquery.tinymce.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/initedit.js?v=#{jsVersion}"></script>
<script type="text/javascript">

	var resizewindow= null;

	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodybottonauto")){
			$('.managebottonadd').css({height:h-40});
		}
	}
	var typemanage_type_add_upid = "_{typemanage_type_add_upid}";
	var typemanage_js_noselect_empty = "_{typemanage_js_noselect_empty}";
	var typemanage_js_typename_empty = "_{typemanage_js_typename_empty}";
	var typemanage_js_dirname_empty = "_{typemanage_js_dirname_empty}";
	var typemanage_js_template_empty = "_{typemanage_js_template_empty}";
	var typemanage_js_typeurl_empty = "_{typemanage_js_typeurl_empty}";
	var typemanage_js_type_shift_typeselect_err = "_{typemanage_js_type_shift_typeselect_err}";
	var typemanage_js_type_edit_ok = "_{typemanage_js_type_edit_ok}";
	var typemanage_js_type_edit_no = "_{typemanage_js_type_edit_no}";
	var typemanage_js_isline_empty = "_{typemanage_js_isline_empty}";
	var subjectmanage_js_pagemax_empty = "_{subjectmanage_js_pagemax_empty}";
	var iframename = "#{iframename}";
	$(document).ready(function(){
	    editsimpleshow_height("#content");
	    editsimpleshow_height("#indexcontent");
		var h = '#{iframeheightwindow}';
		$('.managebottonadd').css({height:h-40});
		var options = {
			beforeSubmit: formverify,
			success:saveResponse
		}
		$('#typeedit').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
		parent.scrolclear();
	})




	function formverify(formData) {
		for (var i=0; i< formData.length; i++){
			if (formData[i].name == "content"){
				formData[i].value=tinyMCE.get('content').getContent();
			}
			else if (formData[i].name == "indexcontent") {
			    formData[i].value = tinyMCE.get('indexcontent').getContent();
			}
		}
		var queryString = $.param(formData);
		var get=urlarray(queryString);
		if(get['iseditdir']==1) {

			if(get['newdirname'].match(/^[\w-]+$/ig)==null) {
				document.typeedit.newdirname.focus();
				alert(typemanage_js_dirname_empty);
				return false;
			}
		}
		if(get['inputupid']!=0){
			if(get['upid']==0){
				document.typeedit.upid.focus();
				alert(typemanage_type_add_upid+typemanage_js_noselect_empty);
				return false;
			}
			if(get['upid']==get['tid']){
				document.typeedit.upid.focus();
				alert(typemanage_js_type_shift_typeselect_err);
				return false;
			}
		}
		if(get['typename']==''){
			document.typeedit.typename.focus();
			alert(typemanage_js_typename_empty);
			return false;
		}
		if(get['styleid']==1 || get['styleid']==2){
			if(get['indextemplates'].match(/^[\w]+$/ig)==null || get['template'].match(/^[\w]+$/ig)==null || get['readtemplate'].match(/^[\w]+$/ig)==null ) {
				document.typeedit.template.focus();
				alert(typemanage_js_template_empty);
				return false;
			}
		}else if(get['styleid']==3 && get['isline']==1 ){
			if(get['typeurl'].match(/^http:\/\/[a-zA-Z\:.0-9-%@#;&?=/_]+$/ig)==null) {
				document.typeedit.typeurl.focus();
				alert(typemanage_js_typeurl_empty);
				return false;
			}
		}else if(get['styleid']==3 && get['isline']==0 ){
			if(get['gotoline'].match(/^[0-9]+$/ig)==null) {
				document.typeedit.gotoline.focus();
				alert(typemanage_js_isline_empty);
				return false;
			}
		}
		if(get['pagemax']!='') {
			if(get['pagemax'].match(/^[0-9]+$/ig)==null) {
				document.typeedit.pagemax.focus();
				alert(subjectmanage_js_pagemax_empty);
				return false;
			}
		}

		parent.windowsdig('Loading','iframe:#{load}','400px','180px','iframe',false);
	}
	function saveResponse(options){
		parent.closeifram();
		if (options=='true'){
			parent.frames[iframename].refresh('selectform','selectall','check_all');
			alert(typemanage_js_type_edit_ok);
		}else{
			alert(typemanage_js_type_edit_ok+"("+options+")");
		}
		parent.scrolopen();
		parent.onaletdoc()
	}
</script>
</head>

<body>
<form name="typeedit" id="typeedit" method="post" action="#{ActionLink}">
<input type="hidden" name="inputclass" value="edit" />
<input type="hidden" name="tid" value="#{typeread.Id}" />
<input type="hidden" name="inputupid" id="inputupid" value="#{typeread.upid}" />
<input type="hidden" name="topid" value="#{typeread.topid}" />
<input type="hidden" name="lng" value="#{typeread.lng}" />
<%var typeread = v.data("typeread") as TypeList; %>
<%if (typeread.styleid > 2) { %><input type="hidden" name="styleid" id="styleid" value="#{typeread.styleid}" /><%} %>
<div id="mainbodybottonauto" class="managebottonadd">
	<div class="maindobycontent">
		<!--查看已选择的类型-->
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">_{position_title}</span><span class="colorgorningage">_{typemanage_type_edit_mess} <u>#{typeread.typename}</u></span></span>
		</div>
		<div class="manageeditdiv">
			<div class="maneditcontent">
				<table class="formtable">
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_lng}</td>
						<td width="85%" class="trtitle02 colorgblue">#{typeread.lng}</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{subjectmanage_type_add_mid}</td>
						<td width="85%" class="trtitle02 colorgblue">#{typeread.ModelName}</td>
					</tr>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{typemanage_type_add_dirname}</td>
						<td width="85%" class="trtitle02 colorgblue">#{typeread.dirname}<input type="hidden" name="dirname" value="#{typeread.dirname}" /></td>
					</tr>
                    <%var is_alonelng = v.data("is_alonelng") as String; %>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{typemanage_type_add_dirpath}</td>
						<td width="85%" class="trtitle02 colorgblue">#{file_htmldir}<%if(is_alonelng !="1"){ %>#{lng}/<%} %><%if(typeread.dirpath !=""){ %>#{typeread.dirpath}/<%} %>#{typeread.dirname}</td>
					</tr>

					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{typemanage_type_add_iseditdir}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="iseditdir" onclick="ondisplay('isdirnamediv','trstyle2 displaytrue');"/> _{is_yes}&nbsp;
							<input type="radio" value="0" name="iseditdir" onclick="ondisplay('isdirnamediv','trstyle2 displaynone')" checked="checked"/> _{is_no}
							<span class="cautiontitle">_{typemanage_type_add_iseditdir_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 displaynone" id="isdirnamediv">
						<td width="15%" class="trtitle011">_{typemanage_type_add_dirname}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="newdirname" size="20" maxlength="20" class="infoInput" onblur="checktypelngname('dirname',this.value,/^[\w-]+$/ig,'<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().CheckDirName) %>?action=checkdirname&upid=#{typeread.upid}&topid=#{typeread.topid}','dirnameerr','_{typemanage_js_type_dirname_check_ok}','_{typemanage_js_type_dirname_check_no}','typeaddsubmitbotton');"/>
							<span class="cautiontitle" id="dirnameerr">_{typemanage_type_add_dirname_mess}</span>
						</td>
					</tr>

					<tr class="trstyle2 <%if(typeread.upid ==0){ %>displaynone<%}else{ %>displaytrue<%} %>">
						<td width="15%" class="trtitle01">_{typemanage_type_add_upid}</td>
						<td width="85%" class="trtitle02">
                            <%if(typeread.upid == 0){ %>
							<input type="hidden" name="upid" value="0" />
							<%}else{ %>
							<select size="1" name="upid" id="upid">
								<option value="0">_{typemanage_type_add_upid_option2}</option>
                                <%var list = v.data("list") as List<TypeList>;%>
								<%foreach(var row in list){ %>
								<option <%if(typeread.upid ==row.Id){ %>selected<%} %> value="<%=row.Id %>"><%var str = string.Empty; %><%for (var i = 1; i < row.level + 1; i++) { %><%str += "&nbsp;&nbsp;&nbsp;&nbsp;"; %><%} %><%=str %><%if(row.level >0){ %>├─ <%} %> <%=row.typename %></option>
								<%} %>
							</select>
							<%} %>
						</td>
					</tr>
                    <%var upid = Convert.ToInt32(v.data("upid")); %>
					<%if(upid > 0){ %>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_upid}</td>
						<td width="85%" class="trtitle02">#{typread.typename}</td>
					</tr>
					<%} %>
					<tr class="trstyle2">
						<td width="15%" class="trtitle011">_{subjectmanage_type_add_subjectname}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="typename" size="60" value="#{typeread.typename}" maxlength="100" class="infoInput"/>
							<span class="cautiontitle">_{subjectmanage_type_add_subjectname_mess}</span>
						</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle011">_{subjectmanage_type_add_othersubjectname}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="othertypename" size="60" value="#{typeread.othertypename}" maxlength="100" class="infoInput"/>
							<span class="cautiontitle">_{subjectmanage_type_add_subjectname_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if (typeread.styleid != 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle011">_{typemanage_type_add_styleid_isline}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="0" name="isline" <%if(typeread.isline==0){ %>checked="checked" <%} %>onclick="ondisplayother('islinediv','trstyle2 displaytrue','typeurldiv','trstyle2 displaynone')"/> _{typemanage_type_add_styleid_isline_0}&nbsp;
							<input type="radio" value="1" name="isline" <%if(typeread.isline==1){ %>checked="checked" <%} %>onclick="ondisplayother('islinediv','trstyle2 displaynone','typeurldiv','trstyle2 displaytrue')"/> _{typemanage_type_add_styleid_isline_1}
							<span class="cautiontitle">_{typemanage_type_add_styleid_isline_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid !=3 || typeread.isline==1){ %>displaynone<%} %>" id="islinediv">
						<td width="15%" class="trtitle011">_{typemanage_type_add_styleid_gotoline}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="gotoline" size="5" maxlength="10" value="#{typeread.gotoline}" class="infoInput"/>
						</td>
					</tr>

					<tr class="trstyle2  <%if(typeread.styleid !=3 || typeread.isline==0){ %>displaynone<%} %>" id="typeurldiv">
						<td width="15%" class="trtitle011">_{typemanage_type_add_url}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="typeurl" size="60" maxlength="150" value="#{typeread.typeurl}" class="infoInput"/>
							<span class="cautiontitle">_{typemanage_type_add_url_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2" id="beeditdiv">
						<td width="15%" class="trtitle01">_{typemanage_type_add_editlist}</td>
						<td width="85%" class="trtitle02">
							<input type="checkbox" value="1" name="beedit"/> _{typemanage_type_add_editlist_mess}&nbsp;
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{subjectmanage_type_add_subpic}</td>
						<td width="85%" class="trtitle02">
							<ul class="addpiclist">
                                <%if(typeread.typepic !=""){ %>
								<li id="addsrlipic"><a title="_{remimages_botton}" ondblclick="removerpic('addsrlipic','typepic')" href="#body"><p><img id="addsrcpic" src="#{adminurl}#{typeread.typepic}" width="100" height="100"></p></a></li>
								<%}else{ %>
								<li id="addsrlipic"><a title="_{selectfile_botton}" onclick="javascript:parent.windowsdig('_{filemanage_select_title}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.PublicController().FileWindow) %>?listfunction=filelist&filetype=img&checkfrom=picshow&getbyid=addsrlipic&fileinputid=typepic&maxselect=1&iframename='+self.frameElement.getAttribute('name'),'900px','480px','iframe')" href="#body"><p><img id="addsrcpic" src="#{path.img}ybb/images/pic.png" width="100" height="100"></p></a></li>
								<%} %>
							</ul>
							<input type="hidden" name="typepic" id="typepic" value="#{typeread.typepic}" size="50" maxlength="50" class="infoInput"/>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{subjectmanage_type_add_subpic}</td>
						<td width="85%" class="trtitle02">
							<ul class="addpiclist">
                                <%if(!typeread.indextypepic.StrIsNullOrEmpty()){ %>
								<li id="addsrlipicindex"><a title="_{remimages_botton}" ondblclick="removerpic('addsrlipicindex','indextypepic')" href="#body"><p><img id="addsrcpic" src="#{adminurl}#{typeread.indextypepic}" width="100" height="100"></p></a></li>
								<%}else{ %>
								<li id="addsrlipicindex"><a title="_{selectfile_botton}" onclick="javascript:parent.windowsdig('_{filemanage_select_title}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.PublicController().FileWindow) %>?listfunction=filelist&filetype=img&checkfrom=picshow&getbyid=addsrlipicindex&fileinputid=indextypepic&maxselect=1&iframename='+self.frameElement.getAttribute('name'),'900px','480px','iframe')" href="#body"><p><img id="addsrcpic" src="#{path.img}ybb/images/pic.png" width="100" height="100"></p></a></li>
								<%} %>
							</ul>
							<input type="hidden" name="indextypepic" id="indextypepic" value="#{typeread.indextypepic}" size="50" maxlength="50" class="infoInput"/>
						</td>
					</tr>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{subjectmanage_type_add_content}</td>
						<td width="85%" class="trtitle02"><textarea name="content" id="content" cols="50" rows="5" class="smallInput" style="width:98%;height:70px;">#{typeread.content}</textarea></td>
					</tr>
                    <tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{subjectmanage_type_add_indexcontent}</td>
						<td width="85%" class="trtitle02"><textarea name="indexcontent" id="indexcontent" cols="50" rows="5" class="smallInput" style="width:98%;height:70px;">#{typeread.indexcontent}</textarea></td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>">
						<td class="trtitle03" colspan="2">_{article_doc_tab_title01}</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>">
						<td class="trtitle01">_{article_doc_add_headtitle}</td>
						<td class="trtitle02"><input type="text" name="headtitle" id="headtitle" value="#{typeread.headtitle}" maxlength="100" class="infoInput" style="width:98%;"/></td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>">
						<td class="trtitle01"></td>
						<td class="trtitle02">
							<a class="keyselect" href="#body" onclick="javascript:parent.windowsdig('_{selectkeytype_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.SEOController().SEOSelect) %>?inputtext=keywords&listfunction=keytype&checkfrom=function&maxselect=1&mid=#{typeread.mid}&iframename='+self.frameElement.getAttribute('name'),'850px','450px','iframe');">_{selectkeytype_botton}</a>
							<a class="keyselect" href="#body" onclick="javascript:parent.windowsdig('_{selectkeyword_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.SEOController().SEOSelect) %>?inputtext=keywords&listfunction=key&checkfrom=input&mid=#{typeread.mid}&iframename='+self.frameElement.getAttribute('name'),'650px','380px','iframe');">_{selectkeyword_botton}</a>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>">
						<td class="trtitle01">_{article_doc_add_keywords}</td>
						<td class="trtitle02">
							<input type="text" name="keywords" id="keywords" value="#{typeread.keywords}" maxlength="100" class="infoInput"  style="width:98%;"/>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>">
						<td class="trtitle01">_{article_doc_add_description}</td>
						<td class="trtitle02">
							<textarea name="description" id="description"  style="width:98%;height:50px;" class="smallInput">#{typeread.description}</textarea>
						</td>
					</tr>

					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{typemanage_type_add_templatesurl}</td>
					</tr>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{subjectmanage_type_add_purview}</td>
						<td width="85%" class="trtitle02">
							<select size="1" name="purview" id="purview">
								<option value="0">_{subjectmanage_type_add_purview_option}</option>
								<%var list1 = v.data("list1") as List<Member_Class>; %>
                                <%foreach(var row in list1){ %>
								<option <%if(typeread.purview ==row.Id){ %>checked<%} %> value="<%=row.Id %>"><%=row.rankname %></option>
								<%} %>
							</select>
						</td>
					</tr>
                    <tr class="trstyle2">
                        <td class="trtitle01">是否显示</td>
                        <td class="trtitle02">
                            <select size="1" name="isshow" id="isshow">
                                <option value="0" <%if(typeread.isshow == 0){ %>selected<%} %>>隐藏</option>
                                <option value="1" <%if(typeread.isshow == 1){ %>selected<%} %>>显示</option>
                            </select>
                        </td>
                    </tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{typemanage_type_add_gotoid}</td>
						<td class="trtitle02">
							<select size="1" name="gotoid" id="gotoid">
								<option value="0">_{typemanage_type_add_gotoid_option}</option>
                                <%var gototypelist = v.data("gototypelist") as List<TypeList>; %>
                                <%foreach(var row in gototypelist){ %>
								<option <%if(typeread.gotoid ==row.Id){ %>selected<%} %> value="<%=row.Id %>"><%var str = string.Empty; %><%for (var i = 1; i < row.level + 1; i++) { %><%str += "&nbsp;&nbsp;&nbsp;&nbsp;"; %><%} %><%=str %><%if(row.level >0){ %>├─ <%} %> <%=row.typename %></option>
								<%} %>
							</select>
							<span class="cautiontitle">_{typemanage_type_add_gotoid_mess}</span>
						</td>
					</tr>
                    <%if(typeread.styleid < 3){ %>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_pageclass}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="pageclass" <%if (typeread.pageclass == 1) {  %>checked="checked" <%} %>onclick="showdiv(1,'#filenamestylediv|#readnamestylediv','0|1','trstyle2 displaynone|trstyle2 displaytrue',1,1)"/> _{typemanage_type_add_pageclass_1}&nbsp;
							<input type="radio" value="0" name="pageclass" <%if (typeread.pageclass == 0) {  %>checked="checked" <%} %>onclick="showdiv(0,'#filenamestylediv|#readnamestylediv','0|1','trstyle2 displaynone|trstyle2 displaytrue',1,1)"/> _{typemanage_type_add_pageclass_0}
							<span class="cautiontitle">_{typemanage_type_add_pageclass_mess}</span>
						</td>
					</tr>
                    <%}else if(typeread.styleid ==4){ %>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_pageclass}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="pageclass"<%if (typeread.pageclass == 1) {  %>checked="checked" <%} %>/> _{typemanage_type_add_pageclass_1}&nbsp;
							<input type="radio" value="0" name="pageclass"<%if (typeread.pageclass == 0) {  %>checked="checked" <%} %>/> _{typemanage_type_add_pageclass_0}
							<span class="cautiontitle">_{typemanage_type_add_pageclass_mess}</span>
						</td>
					</tr>
					<%} %>
					<%if(typeread.styleid < 3){ %>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_styleid}</td>
						<td width="85%" class="trtitle02">
							<select size="1" name="styleid" id="styleid">
								<option <%if(typeread.styleid ==2){ %>selected <%} %>value="2">_{typemanage_type_add_styleid_2}</option>
								<option <%if(typeread.styleid ==1){ %>selected <%} %>value="1">_{typemanage_type_add_styleid_1}</option>
							</select>
						</td>
					</tr>
					<%} %>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{typemanage_type_add_editlist2}</td>
						<td width="85%" class="trtitle02"><input type="checkbox" value="1" name="beistemplatesedit"/> _{typemanage_type_add_editlist2_mess}</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>" id="templatediv">
						<td width="15%" class="trtitle01">_{typemanage_type_add_templateindex}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="indextemplates" id="indextemplates" size="20" maxlength="80" value="<%if(typeread.indextemplates !=""){ %>#{typeread.indextemplates}<%}else{ %>#{tempname.typeindex}<%} %>" class="infoInput"/>
							<a class="filecheck" href="#body" onclick="javascript:parent.windowsdig('_{selecttempfile_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TemplateController().TemplateMain) %>?action=listwindow&inputtext=indextemplates&typeclass=article&skindir=&filedir=article&fileclass=&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),'750px','400px','iframe');">_{selecttempfile_botton}</a>
							<span class="cautiontitle">_{typemanage_type_add_template_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>" id="templatediv">
						<td width="15%" class="trtitle01">_{typemanage_type_add_template}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="template" id="templatevalue" size="20" maxlength="80" value="<%if(typeread.template !=""){ %>#{typeread.template}<%}else{ %>#{tempname.typelist}<%} %>" class="infoInput"/>
							<a class="filecheck" href="#body" onclick="javascript:parent.windowsdig('_{selecttempfile_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TemplateController().TemplateMain) %>?action=listwindow&inputtext=templatevalue&typeclass=article&skindir=&filedir=article&fileclass=&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),'750px','400px','iframe');">_{selecttempfile_botton}</a>
							<span class="cautiontitle">_{typemanage_type_add_template_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>" id="readtemplatediv">
						<td width="15%" class="trtitle01">_{typemanage_type_add_readtemplate}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="readtemplate" id="readtemplatevalue" size="20" maxlength="80" value="<%if(typeread.readtemplate !=""){ %>#{typeread.readtemplate}<%}else{ %>#{tempname.typeread}<%} %>" class="infoInput"/>
							<a class="filecheck" href="#body" onclick="javascript:parent.windowsdig('_{selecttempfile_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TemplateController().TemplateMain) %>?action=listwindow&inputtext=readtemplatevalue&typeclass=article&skindir=&filedir=article&fileclass=&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),'750px','400px','iframe');">_{selecttempfile_botton}</a>
							<span class="cautiontitle">_{typemanage_type_add_template_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4 || typeread.pageclass == 0){ %>displaynone<%} %>" id="filenamestylediv">
						<td width="15%" class="trtitle01">_{typemanage_type_add_filenamestyle}</td>
						<td width="85%" class="trtitle02">
							<select size="1" name="filenamestyle" id="filenamestyle">
								<%var filetemplate = v.data("filetemplate") as List<TypeUrl>; %>
                                <%foreach(var row in filetemplate){ %>
								<option <%if(typeread.filenamestyle==row.Ids){ %>selected <%} %>value="<%=row.Ids %>"><%=row.Name %>.#{file_fileex}</option>
								<%} %>
							</select>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4 || typeread.pageclass == 0){ %>displaynone<%} %>" id="readnamestylediv">
						<td width="15%" class="trtitle01">_{typemanage_type_add_readnamestyle}</td>
						<td width="85%" class="trtitle02">
							<select size="1" name="readnamestyle" id="readnamestyle">
								<%var readtemplate = v.data("readtemplate") as List<TypeUrlRead>; %>
								<%foreach(var row in readtemplate){ %>
								<option <%if(typeread.readnamestyle ==row.Ids){ %>selected <%} %>value="<%=row.Ids %>"><%=row.Name %>.#{file_fileex}</option>
								<%} %>
							</select>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>" id="pagemaxdiv">
						<td width="15%" class="trtitle01">_{subjectmanage_type_add_pagemax}</td>
						<td width="85%" class="trtitle02">
							<input type="text" name="pagemax" size="5" maxlength="3" value="#{typeread.pagemax}" class="infoInput"/>
							<span class="cautiontitle">_{subjectmanage_type_add_pagemax_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>" id="pagemaxdiv2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_isorderby}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="isorderby"<%if(typeread.isorderby ==1){ %> checked="checked"<%} %>/> _{typemanage_type_add_isorderby_1}&nbsp;
							<input type="radio" value="0" name="isorderby"<%if(typeread.isorderby ==0){ %> checked="checked"<%} %>/> _{typemanage_type_add_isorderby_0}
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>" id="pagemaxdiv3">
						<td width="15%" class="trtitle01">_{typemanage_type_add_ordertype}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="ordertype"<%if(typeread.ordertype ==1){ %> checked="checked"<%} %>/> _{typemanage_type_add_ordertype_1}&nbsp;
							<input type="radio" value="2" name="ordertype"<%if(typeread.ordertype ==0){ %> checked="checked"<%} %>/> _{typemanage_type_add_ordertype_2}
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_ismenu}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="ismenu"<%if(typeread.ismenu ==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="ismenu"<%if(typeread.ismenu ==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{typemanage_type_add_ismenu_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{typemanage_type_add_isaccessory}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="isaccessory"<%if(typeread.isaccessory ==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="isaccessory"<%if(typeread.isaccessory ==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{typemanage_type_add_isaccessory_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{typemanage_type_add_ispart}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="ispart"<%if(typeread.ispart ==1){ %> checked="checked"<%} %>/> _{typemanage_type_add_ispart_1}&nbsp;
							<input type="radio" value="0" name="ispart"<%if(typeread.ispart ==0){ %> checked="checked"<%} %>/> _{typemanage_type_add_ispart_0}&nbsp;
							<input type="radio" value="2" name="ispart"<%if(typeread.ispart ==2){ %> checked="checked"<%} %>/> _{typemanage_type_add_ispart_2}
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{iswap_message}</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{iswap_title}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="iswap"<%if(typeread.iswap ==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="iswap"<%if(typeread.iswap ==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{iswap_title_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>" id="beeditdiv">
						<td width="15%" class="trtitle01">_{typemanage_type_add_editlist3}</td>
						<td width="85%" class="trtitle02">
							<input type="checkbox" value="1" name="editwap"/> _{typemanage_type_add_editlist3_mess}&nbsp;
						</td>
					</tr>
					<tr class="trstyle2 <%if(typeread.styleid ==3 || typeread.styleid ==4){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{iswap_templates_file}</td>
						<td width="85%" class="trtitle02">
							<input type="text" id="waptempalte" name="waptempalte" size="30" maxlength="80" value="<%if(typeread.waptempalte !=""){ %>#{typeread.waptempalte}<%}else{ %>#{tempname.typelist}<%} %>" class="infoInput"/>
							<a class="filecheck" href="#body" onclick="javascript:parent.windowsdig('_{selecttempfile_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TemplateController().TemplateMain) %>?action=listwindow&inputtext=waptempalte&typeclass=article&skindir=wap&filedir=article&fileclass=&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),'750px','400px','iframe');">_{selecttempfile_botton}</a>
							<span class="cautiontitle">_{subjectmanage_type_add_template_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if (typeread.styleid == 3){ %>displaynone<%} %>">
						<td width="15%" class="trtitle01">_{iswap_read_templates_file}</td>
						<td width="85%" class="trtitle02">
							<input type="text" id="wapreadtemplate" name="wapreadtemplate" size="30" maxlength="80" value="<%if(typeread.wapreadtemplate !=""){ %>#{typeread.wapreadtemplate}<%}else{ %>#{tempname.typeread}<%} %>" class="infoInput"/>
							<a class="filecheck" href="#body" onclick="javascript:parent.windowsdig('_{selecttempfile_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TemplateController().TemplateMain) %>?action=listwindow&inputtext=wapreadtemplate&typeclass=article&skindir=wap&filedir=article&fileclass=&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),'750px','400px','iframe');">_{selecttempfile_botton}</a>
							<span class="cautiontitle">_{subjectmanage_type_add_template_mess}</span>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<div id="downbotton">
	<div id="subbotton">
		<table border="0" width="100%">
			<tr>
				<td id="right"><input type="submit" id="typeaddsubmitbotton" name="Submit" value="_{botton_edit}" class="buttonface" /></td>
				<td id="left" class="padding-left5"><input type="button" name="cancel" onClick="javascript:closewindow();" value="_{botton_edit_reset}" class="buttonface" /></td>
			</tr>
		</table>
	</div>
</div>
</form>
</body>

</html>